Xbasic

DATE_VALUE Function

Syntax

Date_Value as D = date_value(N year ,N month ,N day )

Arguments

year

The four digit integer representation of a year. Numeric

month

The one or two digit integer representation of a month. Numeric

day

The one or two digit integer representation of a day of the month. Numeric

Description

Returns a date value. Errors if date is out of range

Discussion

DATE_VALUE() returns a Date_Value for the specified year, month and day. This function is useful because it works regardless of what regional settings (e.g. U.S., United Kingdom, etc.) are in effect.

Example

date_value(2000,2,1) -> {2/1/2000} (assuming regional settings are set for the U.S).
date_value(2000,2,1) -> {1/2/2000} (assuming regional settings are set for the U.K).

See Also